<?php


namespace App\Http\Traits;


use Illuminate\Support\Arr;

class GlobalConstant
{

    //统一数组分隔符
    const DELIMITER_CHARACTER = ",";
    const IS_SUG              = [
        1 => '是',
        2 => '否'
    ];

    const SEX_LIST = [
        1 => '男',
        2 => '女',
    ];

    const ROLE_LIST = [
        1 => '学生',
        2 => '老师',
        3 => '游客'
    ];



    const _STATUS = [
        0 => '禁用',
        1 => '正常'
    ];


    public static function getRoleMap($key = "ALL")
    {
        $ret = self::ROLE_LIST;
        if ($key === "ALL") {
            return $ret;
        }
        return Arr::get($ret, $key, false);
    }

}
